package com.macro.mall.dao.impl;

import com.macro.mall.bean.entity.TbPorderSeq;
import com.macro.mall.dao.TbPorderSeqDao;
import com.macro.mall.mapper.TbPorderSeqMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class TbPorderSeqDaoImpl implements TbPorderSeqDao {

    @Autowired
    private TbPorderSeqMapper mapper;

    @Override
    public TbPorderSeq selectById(long id) {
        return mapper.selectByPrimaryKey(id);
    }

    @Override
    public List<TbPorderSeq> listByModel(TbPorderSeq model) {
        return mapper.select(model);
    }

    @Override
    public TbPorderSeq insert(TbPorderSeq model) {
        mapper.insertSelective(model);
        return model;
    }

    @Override
    public int update(TbPorderSeq model) {
        return mapper.updateByPrimaryKeySelective(model);
    }

    @Override
    public int deleteById(long id) {
        return mapper.deleteByPrimaryKey(id);
    }
}
